//
//  XCSecDataModel.m
//  SoundOfNature
//
//  Created by 梁新昌 on 16/3/7.
//  Copyright © 2016年 梁新昌. All rights reserved.
//

#import "XCSecDataModel.h"
@implementation XCSecDataModel
- (void)dealloc {
    [_name release];
    [_desc release];
    [_picUrl release];
    [_songs release];
    [_action release];
    [_mutableArray release];
    [_listenCount release];

    [super dealloc];
}
- (instancetype)initWithDataSource:(NSDictionary *)dataSource
{
    self = [super initWithDataSource:dataSource];
    if (self) {
        
        self.mutableArray = [NSMutableArray arrayWithCapacity:0];
        for (NSDictionary *dic in self.songs) {
            XCSongsModel *songsModel = [[XCSongsModel alloc] initWithDataSource:dic];
            [self.mutableArray addObject:songsModel];
            [songsModel release];
        }
        self.songs = [NSArray arrayWithArray:self.mutableArray];
    }
    return self;
}
@end
